<?php

class openapi_api_function_v1_aboutus extends openapi_api_function_abstract implements openapi_api_function_interface{

	
	public function getcontent($params,&$code,&$sub_msg)
	{
		if($params['policytype']=='salepolicy'){
			$item['content'] = app::get('cellphone')->getConf('cellphone.appinfo.salepolicy');
		}
		if($params['policytype']=='regpolicy'){
			$article = kernel::single('content_article_detail')->get_detail(36, true);
			$item['content'] = $article['bodys']['content'];
		}
		return $this->apiData(true,$item,200);
	}

	
	public function getversion($params,&$code,&$sub_msg)
	{
		$version = app::get('cellphone')->model('appversion')->getRow("*",array('published'=>'true'),"createtime desc");
		return $this->apiData(true,$version,200);
	}

}